package com.gsit.omega.ea.domain;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;

import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooEntity
public class Customer {

	@NotNull
	private String name;

	@NotNull
	private String code;

    private String description;

    @ManyToOne
    private Address primaryAddress;

    @ManyToOne
    private Address secondaryAddress;
    
    @ManyToMany(cascade = CascadeType.ALL)
    private Set<Representative> representatives = new HashSet<Representative>();
}
